package com.dingqb.ndkproject.nativelib;

import android.util.Log;

/**
 * Created by dingqb on 2018/11/19.
 * 通过本地方法调用类方法的过程
 */
public class Jni {
    public  String TAG = "dingqb";
    public int num = 10;

    public static void getPersonName() {
        String tag = "dingqb-this is Jni class's method";
        String TAG = "dignqb";
        Log.e(TAG, "getPersonName: " + tag);
    }
    public void a(){
        String aa= staticValue;
    }
    public static native String showPersonName();

    public static native String replacePersonName(String newName);

    public static native void booleanValue(boolean b);

    public static native void stringArray(String[] strArr);

    public static native void floatArray(float[] fArray);

    public static native String[] returnSringArray(String[] array);

    public static native String[] returnStringArray();

    public native int getJavaIntField();
    public String name = "Test";
    public static String staticValue="this is static string !";
    public native String getJavaField();// 非静态方法获取非静态的属性值
    public native String getstaticJavaField();// 非静态方法获取静态的属性值
    public static native String staticMethod();// 静态方法获取静态属性值
    // todo 静态方法得不到就object，jni中生成的是jclass ，需要生成一个jobject
    public static native String staticMethodNotStaticField();// 静态方法获取非静态属性值

}
